# Contributor:
# Maintainer:
pkgname=liblouis
pkgver=3.28.0
pkgrel=0
pkgdesc="Braille translator and back-translator"
url="https://liblouis.io/"
arch="all"
license="GPL-3.0-or-later"
makedepends="help2man python3"
checkdepends="bash"
subpackages="$pkgname-static $pkgname-dev $pkgname-bin:_bin $pkgname-doc"
source="https://github.com/liblouis/liblouis/releases/download/v$pkgver/liblouis-$pkgver.tar.gz"

# secfixes:
#   3.22.0-r0:
#     - CVE-2022-26981

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-ucs4
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

_bin() {
	amove usr/bin
}

sha512sums="
ac0ef33eff772374e56ac1d6e6ca817f48587a6c12e907acb2f6c10df64f4612f25713b3eaf721c5265178a3709fe9d9c00502dba2583e2fd03f7b064458e42b  liblouis-3.28.0.tar.gz
"
